function columns(vm) {
  const cols = [
    {
      title: '序号',
      dataIndex: 'rowIndex',
      key: 'rowIndex',
      width: 60,
      align: 'center',
      customRender: function (t, r, index) {
        return parseInt(index) + 1
      }
    },
    {
      title: '节点名称',
      align: 'center',
      dataIndex: 'nodeName',
      key: 'nodeName'
    },
    {
      title: '角色名称',
      align: 'center',
      dataIndex: 'roleNames',
      scopedSlots: {customRender: 'roleNames'},
      key: 'roleNames'
    },
    {
      title: '菜单标识',
      align: 'center',
      dataIndex: 'menuIdentify',
      key: 'menuIdentify'
    },
    {
      dataIndex: 'action',
      align: 'center',
      width: 120,
      slots: { title: 'actionName' },
      scopedSlots: {customRender: 'action'}
    }
  ]
  return cols
}

export default columns